Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Add SonarQube Scanning for Pull Requests #2689

Merged
merged 53 commits into from
Oct 29, 2024

Conversation

valeriy42
Copy link
Contributor

@valeriy42 valeriy42 commented Jul 9, 2024

This PR integrates SonarQube scanning for Pull Requests, enabling automatic code quality checks on every new or updated PR. SonarQube will analyze changes for code smells, bugs, and security vulnerabilities, providing feedback directly in the Pull Request. This helps maintain code quality standards and identify issues early.

Some details:

  • SonarQube scans all new PRs.
  • The changes are compared to the baseline of the main branch
  • Comments with detailed feedback are added directly to the PR.
  • At the moment, PRs don't have to meet code quality standards to pass (soft fail).
  • Analysis runs within the existing CI/CD pipeline.
  • There is no code coverage information.
  • Unless the quality rules are changed, most files will be cached so that the analysis overhead is minimal (<3min)

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
1 New issue
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@valeriy42 valeriy42 changed the title [ML] SonarQube buildkite integration [ML] Add SonarQube Scanning for Pull Requests Oct 28, 2024
@valeriy42 valeriy42 removed the v8.16.0 label Oct 28, 2024
@valeriy42 valeriy42 self-assigned this Oct 28, 2024
@valeriy42 valeriy42 marked this pull request as ready for review October 28, 2024 11:33
@valeriy42
Copy link
Contributor Author

@edsavage I have reconfigured the scanner to run on PR, I think having a report on every change will be most beneficial. Once the quality profile is stabilized, we can make it gating.

It would be great if you could take another look.

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@edsavage edsavage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for doing this Valeriy!

@valeriy42 valeriy42 merged commit a21497c into elastic:main Oct 29, 2024
16 checks passed
@valeriy42 valeriy42 deleted the sonar-qube branch October 29, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants